Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::core::RefCnt< T > Class Template Reference

Base class for reference countable objects. More...

#include <refcnt.h>

Inheritance diagram for roc::core::RefCnt< T >:
roc::core::NonCopyable< RefCnt< T > > roc::core::Buffer< sample_t > roc::core::Buffer< uint8_t > roc::core::Buffer< audio::sample_t >

Public Member Functions

long getref () const
 Get reference counter. More...
 
void incref () const
 Increment reference counter. More...
 
void decref () const
 Decrement reference counter. More...
 

Detailed Description

template<class T>
class roc::core::RefCnt< T >

Base class for reference countable objects.

Template Parameters
Tdefines the derived class, which should provide free() method.

Definition at line 25 of file refcnt.h.

Constructor & Destructor Documentation

◆ RefCnt()

template<class T >
roc::core::RefCnt< T >::RefCnt ( )
inline

Definition at line 27 of file refcnt.h.

◆ ~RefCnt()

template<class T >
roc::core::RefCnt< T >::~RefCnt ( )
inline

Definition at line 31 of file refcnt.h.

Member Function Documentation

◆ decref()

template<class T >
void roc::core::RefCnt< T >::decref ( ) const
inline

Decrement reference counter.

Remarks
Calls free() if reference counter becomes zero.

Definition at line 54 of file refcnt.h.

◆ getref()

template<class T >
long roc::core::RefCnt< T >::getref ( ) const
inline

Get reference counter.

Definition at line 39 of file refcnt.h.

◆ incref()

template<class T >
void roc::core::RefCnt< T >::incref ( ) const
inline

Increment reference counter.

Definition at line 44 of file refcnt.h.


The documentation for this class was generated from the following file: